package com.gxa.service;


import com.gxa.common.exception.BusinessException;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * Created by zxd on 2021/1/9
 **/
public interface PayService {


    /**
     * 创建预支付信息
     * @param orderId
     * @return
     */
    public String createPayToken(String orderId) throws BusinessException;


    /**
     * 支付结果确认
     * @param
     * @return true成功  false失败
     */
    public boolean verifyResult();

    /**
     * 发起支付请求
     * @param payToken
     * @return
     */
    public void pay(String payToken, Integer payType, HttpServletResponse response) throws BusinessException;


    /**
     * 支付异步通知
     * @param params
     * @return
     */
    public String asynCallBack(Map<String, String> params) throws BusinessException;
}
